package com.navi.loaddata.core.oracleEntity;

import javax.persistence.*;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "CT_POSMMGPAIRPRODUCT", schema = "P1MESADM", catalog = "")
@IdClass(CtPosmmgpairproductPK.class)
public class CtPosmmgpairproduct {
    private String factoryname;
    private String productspecname;
    private String productspecversion;
    private String actiontype;
    private String panelposition;
    private String destpanelname;
    private String destproductspecname;
    private String destproductspecversion;
    private String startx;
    private String starty;
    private String endx;
    private String endy;
    private String lasteventname;
    private String lasteventtimekey;
    private Timestamp lasteventtime;
    private String lasteventuser;

    @Id
    @Column(name = "FACTORYNAME")
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Id
    @Column(name = "PRODUCTSPECNAME")
    public String getProductspecname() {
        return productspecname;
    }

    public void setProductspecname(String productspecname) {
        this.productspecname = productspecname;
    }

    @Id
    @Column(name = "PRODUCTSPECVERSION")
    public String getProductspecversion() {
        return productspecversion;
    }

    public void setProductspecversion(String productspecversion) {
        this.productspecversion = productspecversion;
    }

    @Id
    @Column(name = "ACTIONTYPE")
    public String getActiontype() {
        return actiontype;
    }

    public void setActiontype(String actiontype) {
        this.actiontype = actiontype;
    }

    @Id
    @Column(name = "PANELPOSITION")
    public String getPanelposition() {
        return panelposition;
    }

    public void setPanelposition(String panelposition) {
        this.panelposition = panelposition;
    }

    @Basic
    @Column(name = "DESTPANELNAME")
    public String getDestpanelname() {
        return destpanelname;
    }

    public void setDestpanelname(String destpanelname) {
        this.destpanelname = destpanelname;
    }

    @Basic
    @Column(name = "DESTPRODUCTSPECNAME")
    public String getDestproductspecname() {
        return destproductspecname;
    }

    public void setDestproductspecname(String destproductspecname) {
        this.destproductspecname = destproductspecname;
    }

    @Basic
    @Column(name = "DESTPRODUCTSPECVERSION")
    public String getDestproductspecversion() {
        return destproductspecversion;
    }

    public void setDestproductspecversion(String destproductspecversion) {
        this.destproductspecversion = destproductspecversion;
    }

    @Basic
    @Column(name = "STARTX")
    public String getStartx() {
        return startx;
    }

    public void setStartx(String startx) {
        this.startx = startx;
    }

    @Basic
    @Column(name = "STARTY")
    public String getStarty() {
        return starty;
    }

    public void setStarty(String starty) {
        this.starty = starty;
    }

    @Basic
    @Column(name = "ENDX")
    public String getEndx() {
        return endx;
    }

    public void setEndx(String endx) {
        this.endx = endx;
    }

    @Basic
    @Column(name = "ENDY")
    public String getEndy() {
        return endy;
    }

    public void setEndy(String endy) {
        this.endy = endy;
    }

    @Basic
    @Column(name = "LASTEVENTNAME")
    public String getLasteventname() {
        return lasteventname;
    }

    public void setLasteventname(String lasteventname) {
        this.lasteventname = lasteventname;
    }

    @Basic
    @Column(name = "LASTEVENTTIMEKEY")
    public String getLasteventtimekey() {
        return lasteventtimekey;
    }

    public void setLasteventtimekey(String lasteventtimekey) {
        this.lasteventtimekey = lasteventtimekey;
    }

    @Basic
    @Column(name = "LASTEVENTTIME")
    public Timestamp getLasteventtime() {
        return lasteventtime;
    }

    public void setLasteventtime(Timestamp lasteventtime) {
        this.lasteventtime = lasteventtime;
    }

    @Basic
    @Column(name = "LASTEVENTUSER")
    public String getLasteventuser() {
        return lasteventuser;
    }

    public void setLasteventuser(String lasteventuser) {
        this.lasteventuser = lasteventuser;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CtPosmmgpairproduct that = (CtPosmmgpairproduct) o;
        return Objects.equals(factoryname, that.factoryname) &&
                Objects.equals(productspecname, that.productspecname) &&
                Objects.equals(productspecversion, that.productspecversion) &&
                Objects.equals(actiontype, that.actiontype) &&
                Objects.equals(panelposition, that.panelposition) &&
                Objects.equals(destpanelname, that.destpanelname) &&
                Objects.equals(destproductspecname, that.destproductspecname) &&
                Objects.equals(destproductspecversion, that.destproductspecversion) &&
                Objects.equals(startx, that.startx) &&
                Objects.equals(starty, that.starty) &&
                Objects.equals(endx, that.endx) &&
                Objects.equals(endy, that.endy) &&
                Objects.equals(lasteventname, that.lasteventname) &&
                Objects.equals(lasteventtimekey, that.lasteventtimekey) &&
                Objects.equals(lasteventtime, that.lasteventtime) &&
                Objects.equals(lasteventuser, that.lasteventuser);
    }

    @Override
    public int hashCode() {

        return Objects.hash(factoryname, productspecname, productspecversion, actiontype, panelposition, destpanelname, destproductspecname, destproductspecversion, startx, starty, endx, endy, lasteventname, lasteventtimekey, lasteventtime, lasteventuser);
    }
}
